import { pget, postFileByFormData, ppostJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 任务列表 
export function getTaskList(query?: any) {
  return pget(`${modalApi.carMessage}/stocktake/task/page`, query);
}

/**
 * 
 * @param query 查询附件列表
 * @returns 
 */
export function getTaskAccessory(query?: any) {
  return pget(`${modalApi.carMessage}/stocktake/task/annexPage`, query);
}

/**
 * 
 * @param query 查询盘点表
 * @returns 
 */
export function getTaskInventory(query?: any) {
  return pget(`${modalApi.carMessage}/stocktake-data-list/task/page`,query);
}

/**
 * 
 * @param data 修改处理
 * @returns 
 */
export function taskUpdate(data: any) {
  return ppostJson(`${modalApi.carMessage}/stocktake/task/update`, data);
}
/**
 * 
 * @param data 导入盘点结论列表
 * @returns 
 */
export function requisitionImport(data: any) {
  return postFileByFormData(
    `${modalApi.carMessage}/stocktake-data-list/task/import`,
    data,
  );
}

/**
 * 
 * @param query 获取错误列表
 * @returns 
 */
export function getErrBaseExcelList(query?: any) {
  return pget(`${modalApi.carMessage}/assetsaccidentdataprocessing/stockatekTaskPage`, query);
}